package com.example.demo.controller;

import com.example.demo.message.MessageProducer;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <h3>demo</h3>
 * <p>Test Class</p>
 *
 * @author : 于家勇
 * @date : 2022-07-29 14:11
 **/
@RestController
@RequestMapping("/index")
public class IndexController {

    @Autowired
    private MessageProducer messageProducer;

    @RequestMapping("/test")
    public String test(String text) {
        messageProducer.lPush(text);
        return text;
    }
}
